<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of ResolutionAbstract
 *
 * @author hodek
 */
abstract class ResolutionAbstract {

    //put your code here

    abstract public function handle();

    abstract public function handleForm();

    public function handleCore() {
        if ($_POST["responseType"] == "removeUser") {
            deleteUser($_POST["login"]);
        }
        if ($_POST["responseType"] == "refreshManifest") {
            dropManifest();
        }
        if ($_POST["responseType"] == "createUser") {
            $role = $_POST["role"] != "" ? $_POST["role"] : null;
            if ($role == null) {
                insertUser($_POST["login"], $_POST["pass"]);
            } else {
                insertUser($_POST["login"], $_POST["pass"], $role);
            }
        }
        if (!isAdmin()) {
            echo "login";
        } else {
            echo "done";
        }
    }

}

?>
